Hi Scott,
Not sure what program you are pasting into the init C program but that doesn't sound correct.
To do simple open loop Speed Control with KSTEP you would configure KMotionCNC's S code to use: Spindle_S_Kstep.c
Configure to use Exec Prog, Thread #2, and Var #1. (KSTEP doesn't have any DACs).
You would need to adjust the definition:
#define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)
to get the proper commanded speed. Set this to whatever speed your Spindle runs at when the "pot" is at full.
To run closed loop would need a different approach and and a way to get the Spindle Position into KFLOP. KFLOP expects an A B Quadrature type of signal connected to a hardware encoder input to easily monitor Spindle Position in order to report actual speed. Can your motor driver output a quadrature signal? If not you may be able to count the pulses in software if they are not too short. KFLOP programs (with 2 active User Threads) are guaranteed to execute every 270us. So the pulse must be at least that long at the highest possible speed to be counted reliably. I've attached a program that you might test to count pulses into KFLOP's Axis 4 Position Variable.
HTH
Regards
TK